package com.doublethread.easymart.common.exception;

import com.doublethread.easymart.common.result.ResultCode;

/**
 * 地址模块异常工具类
 */
public class AddressException {

    /**
     * 地址不存在异常
     */
    public static void addressNotFound() {
        throw new BusinessException(ResultCode.ADDRESS_NOT_FOUND);
    }

    /**
     * 地址数量超出限制异常
     */
    public static void addressLimitExceeded() {
        throw new BusinessException(ResultCode.ADDRESS_LIMIT_EXCEEDED);
    }

    /**
     * 默认地址已存在异常
     */
    public static void defaultAddressExists() {
        throw new BusinessException(ResultCode.DEFAULT_ADDRESS_EXISTS);
    }
}